]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
backgroundMenu: destroy menu when actor is destroyed
authorRay Strode <rstrode@redhat.com>
Tue, 2 Apr 2013 03:57:55 +0000 (23:57 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 3 Apr 2013 03:20:15 +0000 (23:20 -0400)
This fixes a leak.

https://bugzilla.gnome.org/show_bug.cgi?id=697119

js/ui/backgroundMenu.js

index cc6c65397cc04bfa6a2e05602625056218c0bb6c..538abd5b964d98483003db234ddb0439ed1243c0 100644 (file)
@@ -55,4 +55,10 @@ function addBackgroundMenu(actor) {
             openMenu();
     });
     actor.add_action(clickAction);
+
+    actor.connect('destroy', function() {
+                      actor._backgroundMenu.destroy();
+                      actor._backgroundMenu = null;
+                      actor._backgroundManager = null;
+                  });
 }